<template>
	<view>
		<u-navbar title="巡检记录" back-icon-color="#fff"
			:background="{backgroundImage: 'linear-gradient(45deg, #68dae7, #21a4b3)'}" title-color="#FFFFFF">
		</u-navbar>
		<xt-inslist :list= "list" @info="gotoInfo"></xt-inslist>
	</view> 
</template>

<script>
	export default{
		data(){
			return {
				list:[],
				deviceId:null
			}
		},
		onLoad(options) {
			this.deviceId = options.deviceSn
			this.getData()
		},
		methods:{
			getData(){
				let params = {
					deviceId:this.deviceId
				}
				this.$xt.api.inspectlist(params).then(res=>{
					this.list = res.rows
				})
			},
			gotoInfo(id){
				this.$u.route({
					url:'pages/home/inspectionInfo',
					type:"navigateTo",
					params:{
						id:id
					}
				})
			}
		}
	}
</script>

<style>
</style>